import request from '@/utils/request'

// 查询抓拍任务列表
export function listFace(query, flag) {
  return request({
    url: '/deploy/face/list/' + flag,
    method: 'get',
    params: query
  })
}

// 查询抓拍任务详细
export function getFace(id) {
  return request({
    url: '/deploy/face/' + id,
    method: 'get'
  })
}

// 新增抓拍任务
export function addFace(data) {
  return request({
    url: '/deploy/face/deployAdd',
    method: 'post',
    data: data
  })
}

// 修改抓拍任务
export function updateFace(data) {
  return request({
    url: '/deploy/face',
    method: 'put',
    data: data
  })
}

// 删除抓拍任务
export function delFace(id) {
  return request({
    url: '/deploy/face/' + id,
    method: 'delete'
  })
}

// 任务状态修改
export function pauseOrStart(subject, id, status) {
  return request({
    url: '/deploy/face/pauseOrStart',
    method: 'post',
    params: { subject, id, status }
  })
}

// 获取任务人脸
export function getTaskFace(id) {
  return request({
    url: '/deploy/face/getTaskFace/' + id,
    method: 'get'
  })
}
// 查看详情
export function getTaskFaceDetail(id) {
  return request({
    url: '/deploy/face/getTaskFaceDetail/' + id,
    method: 'get'
  })
}
// 新增实有人口抓拍任务
export function addPopulationFace(data, id) {
  return request({
    url: '/deploy/face/deployPopulationAdd/' + id,
    method: 'post',
    data: data
  })
}
